#include<stdio.h>
#include<stdlib.h>

int main(int argc, char *argv[]){
    int n = atoi(argv[1]);
    int live_own_house = 0;
    int i ;
    if(argc > 2){
        int buy = atoi(argv[2]); // live in own house at year
        live_own_house = n - buy;
        if(live_own_house < 0){
            live_own_house = 0;
        }
    }
    int s_work = 3 * n;
    printf("work %d years, live_own_house %d years, ", n, live_own_house);
    float s_live = n - 0.5 * (n - live_own_house);
    int s_age = 20;
    int s_edu = 15;
    int s_area = 6;
    printf("work=%d, live=%.2f ", s_work, s_live);
    float score = s_age + s_edu + s_work + s_live + s_area;
    printf("total score is %.2f\n", score);
}